export function proxyData (vm, key) {
  Object.defineProperty(vm, key, {
    configurable: true,
    enumerable: true,
    get: () => vm.$data[key],
    set: val => { vm.$data[key] = val }
  })
}

export function proxyDatas (vm) {
  Object.keys(vm.$data).forEach((key) => proxyData(vm, key))
}

export function copyProperty (obj, target) {
  Object.keys(obj).forEach((key) => { target[key] = obj[key] })
}
